<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: 13550
  Date: 2022/9/7
  Time: 22:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>我是标题</title>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<%
    Date date = new Date();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    out.print("终于好了！");
%>
<span>当前时间戳：</span><%=date.getTime()%>
<br/>
<span>当前年月日：</span><%=sdf.format(date)%>
<br/>
<button onclick="window.location.href='two.jsp?user=alice&psd=Ab123456'">点我跳转</button>
<% request.getRequestDispatcher("two.jsp").forward(request,response);%>转发
<% response.sendRedirect("two.jsp");%>重定向
</body>
</html>
